<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>查询楼号</title>
</head>
<link rel="stylesheet" type="text/css" href="mystyle.css">

<body bgcolor="#d3d4cc">

<script>
    (function fairyDustCursor() {

        var possibleColors = ["#ead0d1", "#eee5f8", "#8696a7"]
        var width = window.innerWidth;
        var height = window.innerHeight;
        var cursor = {x: width / 2, y: width / 2};
        var particles = [];

        function init() {
            bindEvents();
            loop();
        }

        // Bind events that are needed
        function bindEvents() {
            document.addEventListener('mousemove', onMouseMove);
            window.addEventListener('resize', onWindowResize);
        }

        function onWindowResize(e) {
            width = window.innerWidth;
            height = window.innerHeight;
        }

        function onMouseMove(e) {
            cursor.x = e.clientX;
            cursor.y = e.clientY;

            addParticle(cursor.x, cursor.y, possibleColors[Math.floor(Math.random() * possibleColors.length)]);
        }

        function addParticle(x, y, color) {
            var particle = new Particle();
            particle.init(x, y, color);
            particles.push(particle);
        }

        function updateParticles() {

            // Updated
            for (var i = 0; i < particles.length; i++) {
                particles[i].update();
            }

            // Remove dead particles
            for (var i = particles.length - 1; i >= 0; i--) {
                if (particles[i].lifeSpan < 0) {
                    particles[i].die();
                    particles.splice(i, 1);
                }
            }

        }

        function loop() {
            requestAnimationFrame(loop);
            updateParticles();
        }

        /**
         * Particles
         */

        function Particle() {

            this.character = "*";
            this.lifeSpan = 120; //ms
            this.initialStyles = {
                "position": "fixed",
                "display": "inline-block",
                "top": "0px",
                "left": "0px",
                "pointerEvents": "none",
                "touch-action": "none",
                "z-index": "10000000",
                "fontSize": "25px",
                "will-change": "transform"
            };

            // Init, and set properties
            this.init = function (x, y, color) {

                this.velocity = {
                    x: (Math.random() < 0.5 ? -1 : 1) * (Math.random() / 2),
                    y: 1
                };

                this.position = {x: x + 10, y: y + 10};
                this.initialStyles.color = color;

                this.element = document.createElement('span');
                this.element.innerHTML = this.character;
                applyProperties(this.element, this.initialStyles);
                this.update();

                document.querySelector('.js-cursor-container').appendChild(this.element);
            };

            this.update = function () {
                this.position.x += this.velocity.x;
                this.position.y += this.velocity.y;
                this.lifeSpan--;

                this.element.style.transform = "translate3d(" + this.position.x + "px," + this.position.y + "px, 0) scale(" + (this.lifeSpan / 120) + ")";
            }

            this.die = function () {
                this.element.parentNode.removeChild(this.element);
            }

        }

        /**
         * Utils
         */

        // Applies css `properties` to an element.
        function applyProperties(target, properties) {
            for (var key in properties) {
                target.style[key] = properties[key];
            }
        }

        if (!('ontouchstart' in window || navigator.msMaxTouchPoints)) init();
    })();
</script>


<span class="js-cursor-container">
<center>

    <!--头部表格-->
    <table width="1452" border="0" cellpadding="0" cellspacing="0">
        <!--        标题-->
        <tr bgcolor="#8696a7" style="text-align:center;">
            <td>
                <img src="images/lou.png" style="width: 110px;height: 110px;text-align:center;">
            </td>
            <td colspan="9" height="109">
                <p style="color:#d8caaf;font-size: 70px;text-align:center;">
                    楼栋信息管理系统&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
            </td>
        </tr>

        <tr style="background-color: #965454">
            <td colspan="9" height="10">&nbsp;</td>
        </tr>

        <!--        信息-->
        <tr style="background-color: #965454">
            <td width="10%" align="center" valign="middle" style="font-size: 30px;"><b><?php echo date("Y-m-d"); ?></b>
            </td>
            <td width="10%" align="center" valign="middle"><a href="index.php"
                                                              style="font-size: 30px;color: black;text-decoration: none;">全部信息</a>
            </td>
            <td width="10%" align="center" valign="middle"><a href="add_building.php"
                                                              style="font-size: 30px;color: black;text-decoration: none;">添加信息</a>
            </td>
            <td width="15%" align="center" valign="middle"><a href="search1.php"
                                                              style="font-size: 30px;color: black;text-decoration: none;">查询楼号</a>
            </td>
            <td width="10%" align="center" valign="middle"><a href="building_update.php"
                                                              style="font-size: 30px;color: black;text-decoration: none;">信息修改</a>
            </td>
            <td width="10%" align="center" valign="middle"><a href="searchdel.php"
                                                              style="font-size: 30px;color: black;text-decoration: none;">信息删除</a>
            </td>
            <td width="10%" align="center" valign="middle"><a href="check_in.php"
                                                              style="font-size: 30px;color: black;text-decoration: none;">登录账号</a>
            </td>
        </tr>
        <tr style="background-color: #965454">
            <td colspan="9" height="10">&nbsp;</td>
        </tr>

        <!--        小标题-->
        <tr>
            <td colspan="9" height="10" style="color: #7b8b6f;text-align: center;">
                <h1>查询楼号</h1>
            </td>
        </tr>
        <!--<tr>-->
        <!--    	<td  colspan="9" height="10" >&nbsp;</td>-->
        <!--    </tr>-->
    </table>

    <?php
    if ($_SESSION['type'] == 0) {
                echo '<font color ="#CC0000">请登录!</font>';
                exit();
            }
    ?>

    <form method="post" action="result1.php">

        <div>
            <label>按楼栋序号查找：</label>
            <input type="text" name="buildingId"/>
            <input type="submit" value="查找"/>
        </div>
    </form>

    <!--尾部表格-->
    <table width="1452" border="0" cellpadding="0" cellspacing="0" style="background-color: #d3d4cc;text-align:center;">
        <tr>
            <td colspan="9" height="10">&nbsp;</td>
        </tr>
        <tr>
            <td>页面制作者：潘洪立</td>
        </tr>
        <tr>
            <td>学号：2006030217</td>
        </tr>
        <tr>
            <td>邮箱：1321556096@qq.com</td>
        </tr>
    </table>

</center>
</span>
</body>
</html>